//login模块的封装函数
import request from '@/utils/request'

//1.图形验证码
export const getpicCode = () => {
    return request.get('/captcha/image')
}

//2.短信验证码
export const getMsg = (captchaCode, captchaKey, mobile) => {
    return request.post('/captcha/sendSmsCaptcha', {
        form: {
            captchaCode,
            captchaKey,
            mobile
        }
    })
}

//登陆操作
export const codeLogin = (mobile, smsCode) => {
    return request.post('/passport/login', {
        form: {
            isParty: false,
            partyData: {},
            mobile,
            smsCode
        }
    })
}
